/**
 * 用户相关API
 */
import { api } from '@/utils/request'
import type { PaginatedResponse, User, UserQueryParams } from '@/types/api'

/**
 * 获取用户列表
 */
export function getUsers(params?: UserQueryParams): Promise<PaginatedResponse<User>> {
  return api.get('/users', { params })
}

/**
 * 获取用户详情
 */
export function getUserById(id: number): Promise<any> {
  return api.get(`/users/${id}`)
}

/**
 * 删除用户
 */
export function deleteUser(id: number): Promise<any> {
  return api.delete(`/users/${id}`)
}
